package com.cie2.janji.pages;

import java.util.List;

import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.cie2.janji.entities.Article;
import com.cie2.janji.entities.EntityRoleInTime;
import com.cie2.janji.services.ArticleService;
import com.cie2.janji.services.EntityRoleInTimeService;
import com.cie2.janji.services.PromiseService;

public class Cabinet {

	@Property
	private EntityRoleInTime roleInTime;
	
	@Property
	private Article article;
	
	//services
	@Inject
	private EntityRoleInTimeService entityRoleInTimeService;


	
	@Inject
	private ArticleService articleService;

	public List getEntities() {
		return entityRoleInTimeService.getAll();
	}


	public List getArticles() {
		return articleService.getMinorHeadline();
	}
	
	public Article getLatestArticle() {
		return articleService.getLatestArticle();
	}
}
